// background.js
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
  if (message.type === 'state_update') {
    chrome.storage.local.set({ enabled: message.enabled });
  }
});